package com.example.common.service.impl;


import com.example.common.enums.ExpressEnum;
import com.example.common.service.ExpressService;
import com.example.common.vo.ExpressListVO;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@Service
public class ExpressServiceImpl implements ExpressService {
    /**
     * 快递类型列表
     * @return
     */
    @Override
    public List<ExpressListVO> getList() {
        return Arrays.stream(ExpressEnum.values()).map(expressEnum -> new ExpressListVO(expressEnum.getKey(), expressEnum.getValue())).collect(Collectors.toList());
    }
}
